package com.wicket.okrpbff.biz.service.impl;

import com.wicket.okrapp.integration.FwAppEvaThemeClient;
import com.wicket.okrapp.integration.dto.*;
import com.wicket.okrcomponent.integration.FwCompConfSchemeClient;
import com.wicket.okrcomponent.integration.FwCompSchemeOpenRecordClient;
import com.wicket.okrcomponent.integration.dto.QueryConfSchemeDetailReqDto;
import com.wicket.okrcomponent.integration.dto.QueryConfSchemeDetailRespDto;
import com.wicket.okrcomponent.integration.dto.QuerySchemeOpenRecordDetailReqDto;
import com.wicket.okrcomponent.integration.dto.QuerySchemeOpenRecordDetailRespDto;
import com.wicket.okrframework.integration.FwBaseAppSceneClient;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.dto.*;
import com.wicket.okrpbff.biz.service.EvaThemeService;
import com.wicket.okrpbff.biz.service.dto.common.BffEvalThemeDto;
import com.wicket.okrpbff.biz.service.dto.req.*;
import com.wicket.okrpbff.biz.service.dto.res.*;
import com.wicket.okrpbff.common.util.RedisUtil;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.stream.Collectors;
import com.wicket.okrpbff.common.exception.Assert;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrcomponent.integration.dto.QuerySchemeOpenRecordDetailComRespDto;
import com.wicket.okrcomponent.integration.dto.QuerySchemeOpenRecordDetailComReqDto;
import com.wicket.okrcomponent.integration.dto.RefreshSchemeOpenRecordAddComRespDto;
import com.wicket.okrcomponent.integration.dto.RefreshSchemeOpenRecordAddComReqDto;
import com.wicket.okrcomponent.integration.dto.QueryConfSchemeDetailComRespDto;
import com.wicket.okrcomponent.integration.dto.QueryConfSchemeDetailComReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Service
public class EvaThemeServiceImpl implements EvaThemeService {

    @Resource
    FwCompSchemeOpenRecordClient fwCompSchemeOpenRecordClient;
    @Resource
    FwAppEvaThemeClient fwAppEvaThemeClient;
    @Resource
    FwCompConfSchemeClient fwCompConfSchemeClient;
    @Resource
    FwBaseAppSceneClient fwBaseAppSceneClient;
    @Resource
    FwBaseInductionRecordClient fwBaseInductionRecordClient;
    @Resource
    private RedisUtil redisUtil;

    /**
   * B3-2新增评价主题(平台)[3081]
   * gen by moon at 5/24/2023, 4:03:20 AM
   */
    @Trace(operationName = "B3-2新增评价主题(平台)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffAddEvaThemeRespDto addEvaTheme(BffAddEvaThemeReqDto reqDto){
      
       
       AddEvaThemeRespDto addEvaThemeRespDto_1 =null;
//步骤0: D3-2新增评价主题 - addEvaTheme
     AddEvaThemeRespDto addEvaThemeRespDto = null;
    AddEvaThemeReqDto addEvaThemeReqDto=new AddEvaThemeReqDto();
  if(reqDto!=null){
addEvaThemeReqDto.setEvaluationSubjectName(reqDto.getEvaluationSubjectName());//SimpleFieldAssign//sourceId:895355_1
addEvaThemeReqDto.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:895357_1
addEvaThemeReqDto.setAuthType(reqDto.getAuthType());//SimpleFieldAssign//sourceId:895359_1
addEvaThemeReqDto.setRemainingQty(reqDto.getRemainingQty());//SimpleFieldAssign//sourceId:895360_1
addEvaThemeReqDto.setAuthUnit(reqDto.getAuthUnit());//SimpleFieldAssign//sourceId:895361_1
addEvaThemeReqDto.setStartTime(reqDto.getStartTime());//SimpleFieldAssign//sourceId:895362_1
addEvaThemeReqDto.setEndTime(reqDto.getEndTime());//SimpleFieldAssign//sourceId:895363_1
addEvaThemeReqDto.setIsMainConfScheme(reqDto.getIsMainConfScheme());//SimpleFieldAssign//sourceId:895364_1
addEvaThemeReqDto.setAscriptionSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:895365_1
addEvaThemeReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:895366_1
    }
  
    /*D3-2新增评价主题[2118]   */
Assert.isNull(addEvaThemeReqDto.getEvaluationSubjectName(),"B3-2新增评价主题(平台)-D3-2新增评价主题-评价主题名称不能为空",false);
Assert.isNull(addEvaThemeReqDto.getConfSchemeId(),"B3-2新增评价主题(平台)-D3-2新增评价主题-配置方案ID 不能为空",false);
Assert.isNull(addEvaThemeReqDto.getIsMainConfScheme(),"B3-2新增评价主题(平台)-D3-2新增评价主题-是否主配置方案不能为空",false);
Assert.isNull(addEvaThemeReqDto.getAscriptionSpaceId(),"B3-2新增评价主题(平台)-D3-2新增评价主题-归属空间ID不能为空",false);
Assert.isNull(addEvaThemeReqDto.getSubjectLifeCycle(),"B3-2新增评价主题(平台)-D3-2新增评价主题-主体生命周期不能为空",false);
      addEvaThemeRespDto = fwAppEvaThemeClient.addEvaTheme(addEvaThemeReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      addEvaThemeRespDto_1 = addEvaThemeRespDto;
    
BffAddEvaThemeRespDto retData = new BffAddEvaThemeRespDto();
  if(addEvaThemeRespDto_1!=null){
      retData.setEvaluationSubjectId(addEvaThemeRespDto_1.getEvaluationSubjectId());//SimpleFieldAssign//sourceId:895367_1
retData.setSchOpenRecordId(addEvaThemeRespDto_1.getSchOpenRecordId());//SimpleFieldAssign//sourceId:895368_1
retData.setApplexRelId(addEvaThemeRespDto_1.getApplexRelId());//SimpleFieldAssign//sourceId:895369_1
retData.setBehaviorCurrentStepId(addEvaThemeRespDto_1.getBehaviorCurrentStepId());//SimpleFieldAssign//sourceId:895370_1
    }
  

  
  
return retData;
  }

    /**
   * B3-2删除评价主题(管理)[3161]
   * gen by moon at 9/20/2022, 6:34:34 PM
   */
    @Trace(operationName = "B3-2删除评价主题(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffDeleteEvaThemeRespDto deleteEvaTheme(BffDeleteEvaThemeReqDto reqDto){
      
       
       //步骤0: D3-2删除评价主题 - deleteEvaTheme
     DeleteEvaThemeRespDto deleteEvaThemeRespDto = null;
    DeleteEvaThemeReqDto deleteEvaThemeReqDto=new DeleteEvaThemeReqDto();
  if(reqDto!=null){
      deleteEvaThemeReqDto.setEvaluationSubjectId(reqDto.getEvaluationSubjectId());//sourceId:114750_1
    }
  
    /*D3-2删除评价主题[3162]   */
    Assert.isNull(deleteEvaThemeReqDto.getEvaluationSubjectId(),"B3-2删除评价主题(管理)-D3-2删除评价主题-评价主题ID不能为空",false);
      deleteEvaThemeRespDto = fwAppEvaThemeClient.deleteEvaTheme(deleteEvaThemeReqDto).getData();
      
      
      
    
BffDeleteEvaThemeRespDto retData = new BffDeleteEvaThemeRespDto();
  
  

  
  
return retData;
  }

    /**
   * B3-2查询评价主题详情（平台）[3084]
   * gen by moon at 5/7/2023, 1:52:56 AM
   */
    @Trace(operationName = "B3-2查询评价主题详情（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryEvaThemeDetailRespDto queryEvaThemeDetail(BffQueryEvaThemeDetailReqDto reqDto){
      
       
       QueryEvaThemeDetailRespDto queryEvaThemeDetailRespDto_1 =null;
QuerySchemeOpenRecordDetailComRespDto querySchemeOpenRecordDetailComRespDto_1 =null;
QueryBizSceneDetailRespDto queryBizSceneDetailRespDto_1 =null;
QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 =null;
//步骤0: D3-2查评价主题详情 - queryEvaThemeDetail
     QueryEvaThemeDetailRespDto queryEvaThemeDetailRespDto = null;
    QueryEvaThemeDetailReqDto queryEvaThemeDetailReqDto=new QueryEvaThemeDetailReqDto();
  if(reqDto!=null){
      queryEvaThemeDetailReqDto.setEvaluationSubjectId(reqDto.getEvaluationSubjectId());//SimpleFieldAssign//sourceId:104585_1
    }
  
    /*D3-2查评价主题详情[2309]   */
    Assert.isNull(queryEvaThemeDetailReqDto.getEvaluationSubjectId(),"B3-2查询评价主题详情（平台）-D3-2查评价主题详情-评价主题ID不能为空",false);
      queryEvaThemeDetailRespDto = fwAppEvaThemeClient.queryEvaThemeDetail(queryEvaThemeDetailReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      queryEvaThemeDetailRespDto_1 = queryEvaThemeDetailRespDto;
    
//步骤1: D2-3查询方案开通记录详情(公共) - querySchemeOpenRecordDetailCom
     QuerySchemeOpenRecordDetailComRespDto querySchemeOpenRecordDetailComRespDto = null;
  if(queryEvaThemeDetailRespDto!=null){
          QuerySchemeOpenRecordDetailComReqDto querySchemeOpenRecordDetailComReqDto=new QuerySchemeOpenRecordDetailComReqDto();
if(queryEvaThemeDetailRespDto!=null){
      querySchemeOpenRecordDetailComReqDto.setConfSchemeId(queryEvaThemeDetailRespDto.getConfSchemeId());//SimpleFieldAssign//sourceId:374830_1
      querySchemeOpenRecordDetailComReqDto.setTenantSpaceId(queryEvaThemeDetailRespDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:374825_1
    }
if(reqDto!=null){
      querySchemeOpenRecordDetailComReqDto.setApplexId(reqDto.getEvaluationSubjectId());//SimpleFieldAssign//sourceId:896215_1
    }

    /*D2-3查开通记录[2106]   */
    Assert.isNull(querySchemeOpenRecordDetailComReqDto.getConfSchemeId(),"B3-2查询评价主题详情（平台）-D2-3查开通记录-配置方案ID不能为空",false);
Assert.isNull(querySchemeOpenRecordDetailComReqDto.getTenantSpaceId(),"B3-2查询评价主题详情（平台）-D2-3查开通记录-租户空间ID不能为空",false);
      querySchemeOpenRecordDetailComRespDto = fwCompSchemeOpenRecordClient.querySchemeOpenRecordDetailCom(querySchemeOpenRecordDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      querySchemeOpenRecordDetailComRespDto_1 = querySchemeOpenRecordDetailComRespDto;
           }
    
//步骤2: D1-1查询业务场景详情 - queryBizSceneDetail
     QueryBizSceneDetailRespDto queryBizSceneDetailRespDto = null;
    if(queryEvaThemeDetailRespDto !=null){
          QueryBizSceneDetailReqDto queryBizSceneDetailReqDto=new QueryBizSceneDetailReqDto();
  queryBizSceneDetailReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:114793_1
if(queryEvaThemeDetailRespDto!=null){
      queryBizSceneDetailReqDto.setBizSceneCode(queryEvaThemeDetailRespDto.getBizSceneCode());//SimpleFieldAssign//sourceId:114792_1
    }
  
    /*D1-1查询业务场景详情[713]   */
    Assert.isNull(queryBizSceneDetailReqDto.getBizSceneCode(),"B3-2查询评价主题详情（平台）-D1-1查询业务场景详情-业务场景标识不能为空",false);
Assert.isNull(queryBizSceneDetailReqDto.getSubjectLifeCycle(),"B3-2查询评价主题详情（平台）-D1-1查询业务场景详情-主体生命周期不能为空",false);
      queryBizSceneDetailRespDto = fwBaseAppSceneClient.queryBizSceneDetail(queryBizSceneDetailReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      queryBizSceneDetailRespDto_1 = queryBizSceneDetailRespDto;
           }
    
//步骤3: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
     QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
    if(queryEvaThemeDetailRespDto !=null){
          QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto=new QueryInductionRecordInfoDetailComReqDto();
  if(queryEvaThemeDetailRespDto!=null){
      queryInductionRecordInfoDetailComReqDto.setInductionRecordId(queryEvaThemeDetailRespDto.getOperationInductionId());//SimpleFieldAssign//sourceId:104719_1
    }
  
    /*D1-3查询个人就职记录信息详情（公共）[715]   */
    Assert.isNull(queryInductionRecordInfoDetailComReqDto.getInductionRecordId(),"B3-2查询评价主题详情（平台）-D1-3查询个人就职记录信息详情（公共）-就职记录ID不能为空",false);
      queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
           }
    
BffQueryEvaThemeDetailRespDto retData = new BffQueryEvaThemeDetailRespDto();
  if(queryEvaThemeDetailRespDto_1!=null){
      retData.setEvaluationSubjectId(queryEvaThemeDetailRespDto_1.getEvaluationSubjectId());//SimpleFieldAssign//sourceId:104607_1
retData.setEvaluationSubjectCode(queryEvaThemeDetailRespDto_1.getEvaluationSubjectCode());//SimpleFieldAssign//sourceId:104608_1
retData.setEvaluationSubjectName(queryEvaThemeDetailRespDto_1.getEvaluationSubjectName());//SimpleFieldAssign//sourceId:104609_1
retData.setEvaluationSubjectTypeCode(queryEvaThemeDetailRespDto_1.getEvaluationSubjectTypeCode());//SimpleFieldAssign//sourceId:104611_1
retData.setEvaluationSubjectTypeName(queryEvaThemeDetailRespDto_1.getEvaluationSubjectTypeName());//SimpleFieldAssign//sourceId:896147_1
retData.setBizSceneCode(queryEvaThemeDetailRespDto_1.getBizSceneCode());//SimpleFieldAssign//sourceId:114790_1
retData.setConfSchemeId(queryEvaThemeDetailRespDto_1.getConfSchemeId());//SimpleFieldAssign//sourceId:896148_1
retData.setConfSchemeCode(queryEvaThemeDetailRespDto_1.getConfSchemeCode());//SimpleFieldAssign//sourceId:896149_1
retData.setSubjectLifeCycle(queryEvaThemeDetailRespDto_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:104613_1
retData.setOperationInductionId(queryEvaThemeDetailRespDto_1.getOperationInductionId());//SimpleFieldAssign//sourceId:104614_1
retData.setOperateTime(queryEvaThemeDetailRespDto_1.getOperateTime());//SimpleFieldAssign//sourceId:104615_1
    }
if(queryBizSceneDetailRespDto_1!=null){
      retData.setBizSceneName(queryBizSceneDetailRespDto_1.getBizSceneName());//SimpleFieldAssign//sourceId:114808_1
    }
if(querySchemeOpenRecordDetailComRespDto_1!=null){
      retData.setSchOpenRecordId(querySchemeOpenRecordDetailComRespDto_1.getSchOpenRecordId());//SimpleFieldAssign//sourceId:896219_1
retData.setApplexRelId(querySchemeOpenRecordDetailComRespDto_1.getApplexRelId());//SimpleFieldAssign//sourceId:896220_1
retData.setIsMainConfScheme(querySchemeOpenRecordDetailComRespDto_1.getIsMainConfScheme());//SimpleFieldAssign//sourceId:896153_1
retData.setAuthType(querySchemeOpenRecordDetailComRespDto_1.getAuthType());//SimpleFieldAssign//sourceId:896150_1
retData.setAuthUnit(querySchemeOpenRecordDetailComRespDto_1.getAuthUnit());//SimpleFieldAssign//sourceId:896151_1
      retData.setStartTime(querySchemeOpenRecordDetailComRespDto_1.getStartTime());//SimpleFieldAssign//sourceId:374835_1
retData.setEndTime(querySchemeOpenRecordDetailComRespDto_1.getEndTime());//SimpleFieldAssign//sourceId:374836_1
retData.setRemainingQty(querySchemeOpenRecordDetailComRespDto_1.getRemainingQty());//SimpleFieldAssign//sourceId:374838_1
retData.setAuthUseType(querySchemeOpenRecordDetailComRespDto_1.getAuthUseType());//SimpleFieldAssign//sourceId:896152_1
    }
if(queryInductionRecordInfoDetailComRespDto_1!=null){
      retData.setUserId(queryInductionRecordInfoDetailComRespDto_1.getUserId());//SimpleFieldAssign//sourceId:104726_1
retData.setIdCardName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:104727_1
retData.setNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//SimpleFieldAssign//sourceId:104728_1
retData.setUserFace(queryInductionRecordInfoDetailComRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:104729_1
    }
  

  
  
return retData;
  }

    /**
   * B3-2查询评价主题列表（平台）[3083]
   * gen by moon at 5/29/2023, 8:11:01 PM
   */
    @Trace(operationName = "B3-2查询评价主题列表（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryEvaThemeListRespDto queryEvaThemeList(BffQueryEvaThemeListReqDto reqDto){
      
       
       QueryEvaThemeListRespDto queryEvaThemeListRespDto_1 =null;
BatchQueryInductionRecordComRespDto batchQueryInductionRecordComRespDto_1 =null;
//步骤0: D3-2查评价主题列表 - queryEvaThemeList
     QueryEvaThemeListRespDto queryEvaThemeListRespDto = null;
    QueryEvaThemeListReqDto queryEvaThemeListReqDto=new QueryEvaThemeListReqDto();
  if(reqDto!=null){
      queryEvaThemeListReqDto.setBizSceneCode(reqDto.getBizSceneCode());//SimpleFieldAssign//sourceId:104531_1
queryEvaThemeListReqDto.setAscriptionSpaceId(reqDto.getAscriptionSpaceId());//SimpleFieldAssign//sourceId:104529_1
    }
  
    /*D3-2查评价主题列表[2277]   */
    Assert.isNull(queryEvaThemeListReqDto.getAscriptionSpaceId(),"B3-2查询评价主题列表（平台）-D3-2查评价主题列表-归属空间ID不能为空",false);
      queryEvaThemeListRespDto = fwAppEvaThemeClient.queryEvaThemeList(queryEvaThemeListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      queryEvaThemeListRespDto_1 = queryEvaThemeListRespDto;
    
//步骤1: D1-3批量查询就职记录(管理)(公共) - batchQueryInductionRecordCom
     BatchQueryInductionRecordComRespDto batchQueryInductionRecordComRespDto = null;
    if(queryEvaThemeListRespDto !=null){
          BatchQueryInductionRecordComReqDto batchQueryInductionRecordComReqDto=new BatchQueryInductionRecordComReqDto();
  if(queryEvaThemeListRespDto!= null&&  queryEvaThemeListRespDto.getEvalThemeList() !=null&& !CollectionUtil.isEmpty(queryEvaThemeListRespDto.getEvalThemeList())){
      batchQueryInductionRecordComReqDto.setOrgInductionRecordList(queryEvaThemeListRespDto.getEvalThemeList().stream().map(item->item.getOperationInductionId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:989002_1
    }
  
    /*D1-3批量查询就职记录(管理)(公共)[5024]   */
    
      batchQueryInductionRecordComRespDto = fwBaseInductionRecordClient.batchQueryInductionRecordCom(batchQueryInductionRecordComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      batchQueryInductionRecordComRespDto_1 = batchQueryInductionRecordComRespDto;
           }
    
BffQueryEvaThemeListRespDto retData = new BffQueryEvaThemeListRespDto();
  //数据集融合  MoreListToOneSource
        if(queryEvaThemeListRespDto_1!= null && !CollectionUtil.isEmpty(queryEvaThemeListRespDto_1.getEvalThemeList()) ){
          for (EvalThemeDto evalThemeDto : queryEvaThemeListRespDto_1.getEvalThemeList()) {
              BffEvalThemeDto retElm = new BffEvalThemeDto();
             if(queryEvaThemeListRespDto_1!=null){
      retElm.setEvaluationSubjectId(evalThemeDto.getEvaluationSubjectId());//SimpleFieldAssign//sourceId:57842_2
retElm.setEvaluationSubjectName(evalThemeDto.getEvaluationSubjectName());//SimpleFieldAssign//sourceId:57825_2
retElm.setEvaluationSubjectCode(evalThemeDto.getEvaluationSubjectCode());//SimpleFieldAssign//sourceId:57824_2
retElm.setSubjectLifeCycle(evalThemeDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:57839_2
retElm.setOperateTime(evalThemeDto.getOperateTime());//SimpleFieldAssign//sourceId:57840_2
retElm.setOperationInductionId(evalThemeDto.getOperationInductionId());//SimpleFieldAssign//sourceId:57841_2
    }
              retData.getEvalThemeList().add(retElm);
               if(batchQueryInductionRecordComRespDto_1!= null){
          for (OrgInductionRecordDto orgInductionRecordDto : batchQueryInductionRecordComRespDto_1.getOrgInductionRecordList()) {
                if (orgInductionRecordDto.getInductionRecordId().equals(evalThemeDto.getOperationInductionId())) {
                 if(batchQueryInductionRecordComRespDto_1!=null){
      retElm.setUserId(orgInductionRecordDto.getUserId());//SimpleFieldAssign//sourceId:210652_2
retElm.setIdCardName(orgInductionRecordDto.getIdCardName());//SimpleFieldAssign//sourceId:210654_2
retElm.setNickName(orgInductionRecordDto.getNickName());//SimpleFieldAssign//sourceId:210655_2
retElm.setUserFace(orgInductionRecordDto.getUserFace());//SimpleFieldAssign//sourceId:210653_2
    }
                }
            }
          }
        
          }
        }//sourceId:104552_1
  

  retData.setPageNum(queryEvaThemeListRespDto.getPageNum());
        retData.setPageSize(queryEvaThemeListRespDto.getPageSize());
        retData.setTotal(queryEvaThemeListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryEvaThemeListRespDto.getTotalNum()) / Double.valueOf(queryEvaThemeListRespDto.getPageSize()))) <= retData.getPageNum());
        
  
return retData;
  }

    /**
   * B3-2修改评价主题（平台）[3082]
   * gen by moon at 5/24/2023, 4:03:23 AM
   */
    @Trace(operationName = "B3-2修改评价主题（平台）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUpdateEvaThemeRespDto updateEvaTheme(BffUpdateEvaThemeReqDto reqDto){
      
       
       //步骤0: D3-2修改评价主题 - updateEvaTheme
     UpdateEvaThemeRespDto updateEvaThemeRespDto = null;
    UpdateEvaThemeReqDto updateEvaThemeReqDto=new UpdateEvaThemeReqDto();
  if(reqDto!=null){
      updateEvaThemeReqDto.setEvaluationSubjectId(reqDto.getEvaluationSubjectId());//SimpleFieldAssign//sourceId:104569_1
updateEvaThemeReqDto.setConfSchemeId(reqDto.getConfSchemeId());//SimpleFieldAssign//sourceId:900886_1
updateEvaThemeReqDto.setEvaluationSubjectName(reqDto.getEvaluationSubjectName());//SimpleFieldAssign//sourceId:104570_1
updateEvaThemeReqDto.setAuthType(reqDto.getAuthType());//SimpleFieldAssign//sourceId:896416_1
updateEvaThemeReqDto.setRemainingQty(reqDto.getRemainingQty());//SimpleFieldAssign//sourceId:896417_1
updateEvaThemeReqDto.setAuthUnit(reqDto.getAuthUnit());//SimpleFieldAssign//sourceId:896418_1
updateEvaThemeReqDto.setStartTime(reqDto.getStartTime());//SimpleFieldAssign//sourceId:896419_1
updateEvaThemeReqDto.setEndTime(reqDto.getEndTime());//SimpleFieldAssign//sourceId:896420_1
updateEvaThemeReqDto.setIsMainConfScheme(reqDto.getIsMainConfScheme());//SimpleFieldAssign//sourceId:900887_1
updateEvaThemeReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:104573_1
    }
  
    /*D3-2修改评价主题[3086]   */
    Assert.isNull(updateEvaThemeReqDto.getEvaluationSubjectId(),"B3-2修改评价主题（平台）-D3-2修改评价主题-评价主题ID不能为空",false);
Assert.isNull(updateEvaThemeReqDto.getConfSchemeId(),"B3-2修改评价主题（平台）-D3-2修改评价主题-配置方案ID 不能为空",false);
Assert.isNull(updateEvaThemeReqDto.getIsMainConfScheme(),"B3-2修改评价主题（平台）-D3-2修改评价主题-是否主配置方案不能为空",false);
      updateEvaThemeRespDto = fwAppEvaThemeClient.updateEvaTheme(updateEvaThemeReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      
    
BffUpdateEvaThemeRespDto retData = new BffUpdateEvaThemeRespDto();
  
  

  
  
return retData;
  }
    //
}
